# -*- coding: utf-8 -*-

'''
Created on 21.07.2011

@author: Vlasov A. I. <root@proscript.ru>
'''

from django.contrib import admin

from models import Category, Law, Service, Document, DocumentGroup, Area, PostOffice, CitizenInflectCache

admin.site.register(Category)

class LawAdmin(admin.ModelAdmin):
    #list_display = ('number', 'title')
    pass

admin.site.register(Law, LawAdmin)


class ServiceAdmin(admin.ModelAdmin):
    list_filter = ('group',)
    filter_horizontal = ('categories',)
    
    
admin.site.register(Service, ServiceAdmin)

admin.site.register(DocumentGroup)


admin.site.register(Area)

admin.site.register(PostOffice)

class DocumentAdmin(admin.ModelAdmin):
    ordering = ['group', 'number']
    
    list_filter = ('group',)
    filter_horizontal = ('services', 'categories',)
    search_fields = ('title',)
    
admin.site.register(Document, DocumentAdmin)


class CitizenInflectionsAdmin(admin.ModelAdmin):
    
    ordering = ['nominative']   
    search_fields = ('nominative',)

    
admin.site.register(CitizenInflectCache, CitizenInflectionsAdmin)
